﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OpenHelloGuokr.BasicObjects
{
    /// <summary>
    /// 作者
    /// </summary>
    public sealed class Author
    {
        public Author(string username, string uri = "")
        {
            if (RegexLib.UserName.IsMatch(username))
            {
                _Name = username;
                Uri = uri;
            }
            else
            {
                _Name = string.Empty;
                Uri = string.Empty;
                throw new ArgumentException(@"");
            }
        }

        string _Name = string.Empty;
        /// <summary>
        /// 用户名
        /// </summary>
        public string Name { get { return _Name; } }
        /// <summary>
        /// 用户主页
        /// </summary>
        public string Uri { get; set; }
    }
}
